using DataDynamics.ActiveReports;
using DataDynamics.ActiveReports.Export.Xls;
using SM.core;
using SS;
using System;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Windows.Forms;
using TVSGPP.func;
namespace TVSBH.func
{
	public class frmBookSideEffects1 : Form
	{
		private Func objFunc = new Func();
		private DataTable objTable;
		private DataTable objTableBarcode = new DataTable();
		private Bill objBill = new Bill();
		private string sqlCon = "";
		private int currIndex = 0;
		private IContainer components = null;
		private DataGridView dgvProduct;
		private Button btnClose;
		private Button btnAdd;
		private Button btnUpdate;
		private Button btnPrint;
		private Button btnExportToExcel;
		private Button btnDel;
		private DataGridViewTextBoxColumn ID;
		private DataGridViewTextBoxColumn dateRep;
		private DataGridViewTextBoxColumn patientsName;
		private DataGridViewTextBoxColumn Address;
		private DataGridViewTextBoxColumn Age;
		private DataGridViewTextBoxColumn Gender;
		private DataGridViewTextBoxColumn Description;
		private DataGridViewTextBoxColumn drugs;
		private DataGridViewTextBoxColumn pID;
		private DataGridViewTextBoxColumn dosage;
		private DataGridViewTextBoxColumn numUsage;
		private DataGridViewTextBoxColumn packet;
		private DataGridViewTextBoxColumn Expiry;
		private DataGridViewTextBoxColumn provider;
		private GroupBox groupBox1;
		private Button btnSearch;
		private System.Windows.Forms.Label label25;
		private System.Windows.Forms.Label label17;
		private DateTimePicker dtpTo;
		private DateTimePicker dtpFrom;
		public frmBookSideEffects1()
		{
			this.InitializeComponent();
			this.sqlCon = this.objFunc.strConnectionString;
		}
		private void frmBookSideEffects1_Load(object sender, EventArgs e)
		{
			this.dgvProduct.AutoGenerateColumns = false;
			this.getInfomation();
		}
		private void btnClose_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void frmInput_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.F4)
			{
				this.btnAdd.PerformClick();
			}
			else
			{
				if (e.KeyCode == Keys.F5)
				{
					this.btnUpdate.PerformClick();
				}
				else
				{
					if (e.KeyCode == Keys.F7)
					{
						this.btnPrint.PerformClick();
					}
					else
					{
						if (e.KeyCode == Keys.Escape)
						{
							base.Close();
						}
					}
				}
			}
		}
		public void getInfomation()
		{
			try
			{
				DataTable dataTable = new DataTable();
				SqlConnection sqlConnection = new SqlConnection(this.sqlCon);
				sqlConnection.Open();
				SqlCommand sqlCommand = sqlConnection.CreateCommand();
				sqlCommand.CommandText = "SELECT ID,dateRep,patientsName,Address,Age,Description,drugs,pID,dosage,numUsage,packet,Expiry,provider, REPLACE((REPLACE(CAST(Gender AS varchar(5)),'0',N'Nữ')),'1','Nam') AS Gender FROM [TabSideEffects1] WHERE dateRep BETWEEN @ObjDate1 AND @objDate2 ORDER BY [ID] ASC";
				SqlParameter sqlParameter = new SqlParameter("ObjDate1", SqlDbType.DateTime);
				SqlParameter sqlParameter2 = new SqlParameter("ObjDate2", SqlDbType.DateTime);
				sqlParameter.Value = DateTime.Parse(this.dtpFrom.Value.ToString().Substring(0, 10) + " 00:00:00 AM");
				sqlParameter2.Value = DateTime.Parse(this.dtpTo.Value.ToString().Substring(0, 10) + " 11:59:59 PM");
				sqlCommand.Parameters.Add(sqlParameter);
				sqlCommand.Parameters.Add(sqlParameter2);
				SqlDataAdapter sqlDataAdapter = new SqlDataAdapter();
				sqlDataAdapter.SelectCommand = sqlCommand;
				DataSet dataSet = new DataSet();
				sqlDataAdapter.Fill(dataSet);
				sqlConnection.Close();
				sqlConnection.Dispose();
				this.objTable = dataSet.Tables[0];
				this.dgvProduct.DataSource = this.objTable;
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
				this.objTable = null;
				this.dgvProduct.DataSource = this.objTable;
			}
		}
		private void btnSearch_Click(object sender, EventArgs e)
		{
			this.getInfomation();
		}
		private void resetDataGridView()
		{
			this.objTable = null;
			this.dgvProduct.DataSource = this.objTable;
		}
		private void btnEdit_Click(object sender, EventArgs e)
		{
			new frmAddSideEffects1
			{
				ID = "0"
			}.ShowDialog();
			this.getInfomation();
		}
		private void dgvProduct_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
		{
			frmAddSideEffects1 frmAddSideEffects = new frmAddSideEffects1();
			frmAddSideEffects.ID = this.dgvProduct.Rows[this.currIndex].Cells["ID"].Value.ToString();
			frmAddSideEffects.dtpDateRep.Value = DateTime.Parse(this.dgvProduct.Rows[this.currIndex].Cells["dateRep"].Value.ToString());
			frmAddSideEffects.txtPatientsName.Text = this.dgvProduct.Rows[this.currIndex].Cells["patientsName"].Value.ToString();
			frmAddSideEffects.txtAddress.Text = this.dgvProduct.Rows[this.currIndex].Cells["Address"].Value.ToString();
			frmAddSideEffects.txtAge.Text = this.dgvProduct.Rows[this.currIndex].Cells["Age"].Value.ToString();
			if (this.dgvProduct.Rows[this.currIndex].Cells["Gender"].Value.ToString() == "True")
			{
				frmAddSideEffects.cbbGender.SelectedIndex = 0;
			}
			else
			{
				frmAddSideEffects.cbbGender.SelectedIndex = 1;
			}
			frmAddSideEffects.txtDescription.Text = this.dgvProduct.Rows[this.currIndex].Cells["description"].Value.ToString();
			frmAddSideEffects.txtDrugs.Text = this.dgvProduct.Rows[this.currIndex].Cells["drugs"].Value.ToString();
			frmAddSideEffects.txtDosage.Text = this.dgvProduct.Rows[this.currIndex].Cells["dosage"].Value.ToString();
			frmAddSideEffects.txtNumUsage.Text = this.dgvProduct.Rows[this.currIndex].Cells["numUsage"].Value.ToString();
			frmAddSideEffects.txtPacket.Text = this.dgvProduct.Rows[this.currIndex].Cells["packet"].Value.ToString();
			frmAddSideEffects.dtpExpiry.Value = DateTime.Parse(this.dgvProduct.Rows[this.currIndex].Cells["Expiry"].Value.ToString());
			frmAddSideEffects.txtProvider.Text = this.dgvProduct.Rows[this.currIndex].Cells["Provider"].Value.ToString();
			frmAddSideEffects.ShowDialog();
		}
		private void btnUpdate_Click(object sender, EventArgs e)
		{
			this.getInfomation();
		}
		private void btnPrint_Click(object sender, EventArgs e)
		{
			frmBookSellNotBillView frmBookSellNotBillView = new frmBookSellNotBillView();
			frmBookSellNotBillView.objectName = "BookSideEffects1";
			frmBookSideEffects1Print.objTable = this.objTable;
			frmBookSellNotBillView.ShowDialog();
		}
		private void btnExportToExcel_Click(object sender, EventArgs e)
		{
			try
			{
				frmBookSideEffects1Print.objTable = new DataTable();
				frmBookSideEffects1Print.objTable = this.objTable;
				ActiveReport3 activeReport = new frmBookSideEffects1Print();
				activeReport.Run();
				XlsExport xlsExport = new XlsExport();
				SaveFileDialog saveFileDialog = new SaveFileDialog();
				saveFileDialog.ShowDialog();
				string text = saveFileDialog.FileName;
				if (text != "")
				{
					if (!text.ToUpper().Contains(".XLS"))
					{
						text += ".xls";
					}
					xlsExport.Export(activeReport.Document, text);
					MessageBox.Show("Hệ thống đã hoàn thành việc xuất dữ liệu ra file Excel", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				}
				else
				{
					MessageBox.Show("Bạn chưa chọn đường dẫn và tên file cần xuất!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
			}
			catch
			{
			}
		}
		private void dgvProduct_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
			this.currIndex = e.RowIndex;
		}
		public void delItem()
		{
			try
			{
				if (this.dgvProduct.Rows[this.currIndex].Cells["ID"].Value.ToString() != null)
				{
					if (MessageBox.Show("Bạn có chắc chắn muốn xoá mục được chọn không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
					{
						SqlConnection sqlConnection = new SqlConnection(this.sqlCon);
						sqlConnection.Open();
						SqlCommand sqlCommand = sqlConnection.CreateCommand();
						sqlCommand.CommandText = "DELETE [TabSideEffects1] WHERE [ID] = " + this.dgvProduct.Rows[this.currIndex].Cells["ID"].Value.ToString();
						sqlCommand.ExecuteNonQuery();
						sqlConnection.Close();
						sqlConnection.Dispose();
						this.getInfomation();
					}
				}
			}
			catch
			{
			}
		}
		private void btnDel_Click(object sender, EventArgs e)
		{
			this.delItem();
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmBookSideEffects1));
			this.dgvProduct = new DataGridView();
			this.ID = new DataGridViewTextBoxColumn();
			this.dateRep = new DataGridViewTextBoxColumn();
			this.patientsName = new DataGridViewTextBoxColumn();
			this.Address = new DataGridViewTextBoxColumn();
			this.Age = new DataGridViewTextBoxColumn();
			this.Gender = new DataGridViewTextBoxColumn();
			this.Description = new DataGridViewTextBoxColumn();
			this.drugs = new DataGridViewTextBoxColumn();
			this.pID = new DataGridViewTextBoxColumn();
			this.dosage = new DataGridViewTextBoxColumn();
			this.numUsage = new DataGridViewTextBoxColumn();
			this.packet = new DataGridViewTextBoxColumn();
			this.Expiry = new DataGridViewTextBoxColumn();
			this.provider = new DataGridViewTextBoxColumn();
			this.btnClose = new Button();
			this.btnAdd = new Button();
			this.btnUpdate = new Button();
			this.btnPrint = new Button();
			this.btnExportToExcel = new Button();
			this.btnDel = new Button();
			this.groupBox1 = new GroupBox();
			this.btnSearch = new Button();
			this.label25 = new System.Windows.Forms.Label();
			this.label17 = new System.Windows.Forms.Label();
			this.dtpTo = new DateTimePicker();
			this.dtpFrom = new DateTimePicker();
			((ISupportInitialize)this.dgvProduct).BeginInit();
			this.groupBox1.SuspendLayout();
			base.SuspendLayout();
			this.dgvProduct.AllowUserToAddRows = false;
			this.dgvProduct.AllowUserToDeleteRows = false;
			this.dgvProduct.AllowUserToOrderColumns = true;
			this.dgvProduct.AllowUserToResizeColumns = false;
			this.dgvProduct.AllowUserToResizeRows = false;
			dataGridViewCellStyle.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle;
			this.dgvProduct.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvProduct.BackgroundColor = Color.White;
			this.dgvProduct.BorderStyle = BorderStyle.Fixed3D;
			this.dgvProduct.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
			this.dgvProduct.Columns.AddRange(new DataGridViewColumn[]
			{
				this.ID,
				this.dateRep,
				this.patientsName,
				this.Address,
				this.Age,
				this.Gender,
				this.Description,
				this.drugs,
				this.pID,
				this.dosage,
				this.numUsage,
				this.packet,
				this.Expiry,
				this.provider
			});
			this.dgvProduct.Cursor = Cursors.Hand;
			this.dgvProduct.EnableHeadersVisualStyles = false;
			this.dgvProduct.Location = new System.Drawing.Point(7, 62);
			this.dgvProduct.MultiSelect = false;
			this.dgvProduct.Name = "dgvProduct";
			this.dgvProduct.ReadOnly = true;
			this.dgvProduct.RowHeadersVisible = false;
			this.dgvProduct.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			this.dgvProduct.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvProduct.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvProduct.Size = new Size(886, 500);
			this.dgvProduct.TabIndex = 0;
			this.dgvProduct.CellDoubleClick += new DataGridViewCellEventHandler(this.dgvProduct_CellDoubleClick);
			this.dgvProduct.CellEnter += new DataGridViewCellEventHandler(this.dgvProduct_CellEnter);
			this.ID.DataPropertyName = "ID";
			this.ID.HeaderText = "ID";
			this.ID.Name = "ID";
			this.ID.ReadOnly = true;
			this.ID.Visible = false;
			this.dateRep.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dateRep.DataPropertyName = "dateRep";
			dataGridViewCellStyle2.Format = "D";
			dataGridViewCellStyle2.NullValue = null;
			this.dateRep.DefaultCellStyle = dataGridViewCellStyle2;
			this.dateRep.HeaderText = "Ngày tháng";
			this.dateRep.MinimumWidth = 85;
			this.dateRep.Name = "dateRep";
			this.dateRep.ReadOnly = true;
			this.dateRep.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.dateRep.Width = 85;
			this.patientsName.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.patientsName.DataPropertyName = "patientsName";
			this.patientsName.HeaderText = "Tên người bệnh";
			this.patientsName.MinimumWidth = 200;
			this.patientsName.Name = "patientsName";
			this.patientsName.ReadOnly = true;
			this.patientsName.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.patientsName.Width = 200;
			this.Address.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Address.DataPropertyName = "Address";
			this.Address.HeaderText = "Địa chỉ";
			this.Address.MinimumWidth = 250;
			this.Address.Name = "Address";
			this.Address.ReadOnly = true;
			this.Address.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Address.Width = 250;
			this.Age.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Age.DataPropertyName = "Age";
			this.Age.HeaderText = "Tuổi";
			this.Age.MinimumWidth = 45;
			this.Age.Name = "Age";
			this.Age.ReadOnly = true;
			this.Age.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Age.Width = 45;
			this.Gender.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Gender.DataPropertyName = "Gender";
			dataGridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleCenter;
			this.Gender.DefaultCellStyle = dataGridViewCellStyle3;
			this.Gender.HeaderText = "Giới tính";
			this.Gender.MinimumWidth = 70;
			this.Gender.Name = "Gender";
			this.Gender.ReadOnly = true;
			this.Gender.Resizable = DataGridViewTriState.True;
			this.Gender.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Gender.Width = 70;
			this.Description.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Description.DataPropertyName = "Description";
			this.Description.HeaderText = "Mô tả triệu chứng";
			this.Description.MinimumWidth = 250;
			this.Description.Name = "Description";
			this.Description.ReadOnly = true;
			this.Description.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Description.Width = 250;
			this.drugs.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.drugs.DataPropertyName = "drugs";
			this.drugs.HeaderText = "Thuốc sử dụng";
			this.drugs.MinimumWidth = 200;
			this.drugs.Name = "drugs";
			this.drugs.ReadOnly = true;
			this.drugs.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.drugs.Width = 200;
			this.pID.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.pID.DataPropertyName = "pID";
			this.pID.HeaderText = "pID";
			this.pID.Name = "pID";
			this.pID.ReadOnly = true;
			this.pID.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.pID.Visible = false;
			this.dosage.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dosage.DataPropertyName = "dosage";
			this.dosage.HeaderText = "Liều dùng";
			this.dosage.MinimumWidth = 200;
			this.dosage.Name = "dosage";
			this.dosage.ReadOnly = true;
			this.dosage.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.dosage.Width = 200;
			this.numUsage.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.numUsage.DataPropertyName = "numUsage";
			this.numUsage.HeaderText = "Số lần dùng";
			this.numUsage.MinimumWidth = 100;
			this.numUsage.Name = "numUsage";
			this.numUsage.ReadOnly = true;
			this.numUsage.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.packet.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.packet.DataPropertyName = "packet";
			this.packet.HeaderText = "Số lô";
			this.packet.MinimumWidth = 100;
			this.packet.Name = "packet";
			this.packet.ReadOnly = true;
			this.packet.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Expiry.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Expiry.DataPropertyName = "Expiry";
			dataGridViewCellStyle4.Format = "D";
			dataGridViewCellStyle4.NullValue = null;
			this.Expiry.DefaultCellStyle = dataGridViewCellStyle4;
			this.Expiry.HeaderText = "Hạn sử dụng";
			this.Expiry.MinimumWidth = 90;
			this.Expiry.Name = "Expiry";
			this.Expiry.ReadOnly = true;
			this.Expiry.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Expiry.Width = 90;
			this.provider.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.provider.DataPropertyName = "provider";
			this.provider.HeaderText = "Hãng sản xuất";
			this.provider.MinimumWidth = 250;
			this.provider.Name = "provider";
			this.provider.ReadOnly = true;
			this.provider.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.provider.Width = 250;
			this.btnClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnClose.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnClose.FlatStyle = FlatStyle.Flat;
			this.btnClose.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnClose.Location = new System.Drawing.Point(802, 567);
			this.btnClose.Name = "btnClose";
			this.btnClose.Size = new Size(91, 26);
			this.btnClose.TabIndex = 6;
			this.btnClose.Text = "Thoát [ ESC ]";
			this.btnClose.UseVisualStyleBackColor = true;
			this.btnClose.Click += new EventHandler(this.btnClose_Click);
			this.btnAdd.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnAdd.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnAdd.FlatStyle = FlatStyle.Flat;
			this.btnAdd.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnAdd.Location = new System.Drawing.Point(7, 567);
			this.btnAdd.Name = "btnAdd";
			this.btnAdd.Size = new Size(105, 26);
			this.btnAdd.TabIndex = 1;
			this.btnAdd.Text = "Thêm mới [ F4 ]";
			this.btnAdd.UseVisualStyleBackColor = true;
			this.btnAdd.Click += new EventHandler(this.btnEdit_Click);
			this.btnUpdate.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnUpdate.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnUpdate.FlatStyle = FlatStyle.Flat;
			this.btnUpdate.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnUpdate.Location = new System.Drawing.Point(114, 568);
			this.btnUpdate.Name = "btnUpdate";
			this.btnUpdate.Size = new Size(98, 26);
			this.btnUpdate.TabIndex = 2;
			this.btnUpdate.Text = "Cập nhật [ F5 ]";
			this.btnUpdate.UseVisualStyleBackColor = true;
			this.btnUpdate.Click += new EventHandler(this.btnUpdate_Click);
			this.btnPrint.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnPrint.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnPrint.FlatStyle = FlatStyle.Flat;
			this.btnPrint.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnPrint.Location = new System.Drawing.Point(310, 568);
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.Size = new Size(109, 26);
			this.btnPrint.TabIndex = 3;
			this.btnPrint.Text = "In báo cáo [ F7 ]";
			this.btnPrint.UseVisualStyleBackColor = true;
			this.btnPrint.Click += new EventHandler(this.btnPrint_Click);
			this.btnExportToExcel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnExportToExcel.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnExportToExcel.FlatStyle = FlatStyle.Flat;
			this.btnExportToExcel.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnExportToExcel.Location = new System.Drawing.Point(421, 568);
			this.btnExportToExcel.Name = "btnExportToExcel";
			this.btnExportToExcel.Size = new Size(102, 26);
			this.btnExportToExcel.TabIndex = 4;
			this.btnExportToExcel.Text = "Xuất file Excel";
			this.btnExportToExcel.UseVisualStyleBackColor = true;
			this.btnExportToExcel.Click += new EventHandler(this.btnExportToExcel_Click);
			this.btnDel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnDel.FlatAppearance.BorderColor = Color.FromArgb(255, 128, 255);
			this.btnDel.FlatStyle = FlatStyle.Flat;
			this.btnDel.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnDel.Location = new System.Drawing.Point(214, 568);
			this.btnDel.Name = "btnDel";
			this.btnDel.Size = new Size(94, 26);
			this.btnDel.TabIndex = 5;
			this.btnDel.Text = "Xoá thông tin";
			this.btnDel.UseVisualStyleBackColor = true;
			this.btnDel.Click += new EventHandler(this.btnDel_Click);
			this.groupBox1.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.groupBox1.Controls.Add(this.btnSearch);
			this.groupBox1.Controls.Add(this.label25);
			this.groupBox1.Controls.Add(this.label17);
			this.groupBox1.Controls.Add(this.dtpTo);
			this.groupBox1.Controls.Add(this.dtpFrom);
			this.groupBox1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox1.Location = new System.Drawing.Point(7, 5);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new Size(886, 54);
			this.groupBox1.TabIndex = 70;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Thời gian xem sổ";
			this.btnSearch.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnSearch.FlatStyle = FlatStyle.Flat;
			this.btnSearch.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
//			this.btnSearch.Image = (Image)componentResourceManager.GetObject("btnSearch.Image");
			this.btnSearch.Location = new System.Drawing.Point(365, 21);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new Size(21, 21);
			this.btnSearch.TabIndex = 152;
			this.btnSearch.UseVisualStyleBackColor = true;
			this.btnSearch.Click += new EventHandler(this.btnSearch_Click);
			this.label25.AutoSize = true;
			this.label25.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.label25.Location = new System.Drawing.Point(113, 24);
			this.label25.Name = "label25";
			this.label25.Size = new Size(57, 15);
			this.label25.TabIndex = 151;
			this.label25.Text = "Từ ngày :";
			this.label17.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
//			this.label17.Image = (Image)componentResourceManager.GetObject("label17.Image");
			this.label17.Location = new System.Drawing.Point(258, 20);
			this.label17.Name = "label17";
			this.label17.Size = new Size(20, 25);
			this.label17.TabIndex = 150;
			this.dtpTo.CustomFormat = "dd/MM/yyyy";
			this.dtpTo.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.dtpTo.Format = DateTimePickerFormat.Custom;
			this.dtpTo.Location = new System.Drawing.Point(280, 21);
			this.dtpTo.Name = "dtpTo";
			this.dtpTo.Size = new Size(81, 21);
			this.dtpTo.TabIndex = 149;
			this.dtpFrom.CustomFormat = "dd/MM/yyyy";
			this.dtpFrom.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.dtpFrom.Format = DateTimePickerFormat.Custom;
			this.dtpFrom.Location = new System.Drawing.Point(174, 21);
			this.dtpFrom.Name = "dtpFrom";
			this.dtpFrom.Size = new Size(81, 21);
			this.dtpFrom.TabIndex = 148;
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			this.BackColor = Color.White;
			base.ClientSize = new Size(900, 600);
			base.Controls.Add(this.groupBox1);
			base.Controls.Add(this.btnDel);
			base.Controls.Add(this.btnExportToExcel);
			base.Controls.Add(this.btnPrint);
			base.Controls.Add(this.btnUpdate);
			base.Controls.Add(this.btnAdd);
			base.Controls.Add(this.btnClose);
			base.Controls.Add(this.dgvProduct);
			this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			//base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon");
			//base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.KeyPreview = true;
			base.Name = "frmBookSideEffects1";
			base.ShowInTaskbar = false;
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "SỔ THEO DÕI TÁC DỤNG PHỤ CỦA THUỐC";
			base.WindowState = FormWindowState.Maximized;
			base.Load += new EventHandler(this.frmBookSideEffects1_Load);
			base.KeyDown += new KeyEventHandler(this.frmInput_KeyDown);
			((ISupportInitialize)this.dgvProduct).EndInit();
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			base.ResumeLayout(false);
		}
	}
}
